<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!--公共CSS-->
<head th:fragment="commomcss">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>workmanageol</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" th:href="@{https://www.jq22.com/jquery/bootstrap-4.2.1.css}">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" th:href="@{https://use.fontawesome.com/releases/v5.3.1/css/all.css}" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
    <!-- Google fonts - Popppins for copy-->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,800">
    <!-- orion icons-->
    <link rel="stylesheet" th:href="@{/assert/css/orionicons.css}">
    <!-- theme stylesheet-->
    <link rel="stylesheet" th:href="@{/assert/css/style.blue.css}" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" th:href="@{/assert/css/custom.css}">
    <!-- Favicon-->
    <link rel="shortcut icon" th:href="@{/assert/img/favicon.png(3)}">

    <!--angularjs分页样式-->
    <link rel="stylesheet" href="/angularjs/pagination.css">
</head>
<body>
    <!--公共JS部分-->
    <div th:fragment="commomjs">
        <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
        <script th:src="@{/assert/vendor/popper.js/umd/popper.min.js}"> </script>
        <script src="https://www.jq22.com/jquery/bootstrap-4.2.1.js"></script>
        <script th:src="@{/assert/vendor/jquery.cookie/jquery.cookie.js}"> </script>
        <script src="https://cdn.bootcss.com/Chart.js/2.7.2/Chart.min.js"></script>
        <script th:src="@{/assert/js/js.cookie.min.js}"></script>
        <script th:src="@{/assert/js/front.js}"></script>
        <script src="/angularjs/angular.min.js"></script>
        <script src="/angularjs/pagination.js"></script>

    </div>
	<!--顶部导航栏-->
	<!-- navbar-->
    <div th:fragment="commonheader">
    <header class="header" th:fragment="commonheader">
      <nav class="navbar navbar-expand-lg px-4 py-2 bg-white shadow"><a href="#" class="sidebar-toggler text-gray-500 mr-4 mr-lg-5 lead"><i class="fas fa-align-left"></i></a><a href="index.html" class="navbar-brand font-weight-bold text-uppercase text-base">作业管理</a>
        <ul class="ml-auto d-flex align-items-center list-unstyled mb-0">
          <li class="nav-item">
            <form id="searchForm" class="ml-auto d-none d-lg-block">
              <div class="form-group position-relative mb-0" style="visibility: hidden">
                <button type="submit" style="top: -3px; left: 0;" class="position-absolute bg-white border-0 p-0"><i class="o-search-magnify-1 text-gray text-lg"></i></button>
                <input type="search" placeholder="Search ..." class="form-control form-control-sm border-0 no-shadow pl-4">
              </div>
            </form>
          </li>
          <li class="nav-item dropdown mr-3">
            <div aria-labelledby="notifications" class="dropdown-menu"><a href="#" class="dropdown-item" style="visibility: hidden">
                <div class="d-flex align-items-center">
                  <div class="icon icon-sm bg-violet text-white"><i class="fab fa-twitter"></i></div>
                  <div class="text ml-2">
                    <p class="mb-0">You have 2 followers</p>
                  </div>
                </div></a><a href="#" class="dropdown-item"> 
                <div class="d-flex align-items-center">
                  <div class="icon icon-sm bg-green text-white"><i class="fas fa-envelope"></i></div>
                  <div class="text ml-2">
                    <p class="mb-0">You have 6 new messages</p>
                  </div>
                </div></a><a href="#" class="dropdown-item">
                <div class="d-flex align-items-center">
                  <div class="icon icon-sm bg-blue text-white"><i class="fas fa-upload"></i></div>
                  <div class="text ml-2">
                    <p class="mb-0">Server rebooted</p>
                  </div>
                </div></a><a href="#" class="dropdown-item">
                <div class="d-flex align-items-center">
                  <div class="icon icon-sm bg-violet text-white"><i class="fab fa-twitter"></i></div>
                  <div class="text ml-2">
                    <p class="mb-0">You have 2 followers</p>
                  </div>
                </div></a>
              <div class="dropdown-divider"></div><a href="#" class="dropdown-item text-center"><small class="font-weight-bold headings-font-family text-uppercase">View all notifications</small></a>
            </div>
          </li>
          <li class="nav-item dropdown ml-auto"><a id="userInfo" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle"><img style="max-width: 2.5rem;" class="img-fluid rounded-circle shadow"></a>
            <div aria-labelledby="userInfo" class="dropdown-menu"><a href="#" class="dropdown-item"><strong class="d-block text-uppercase headings-font-family">Mark Stephen</strong><small>Web Developer</small></a>
              <div class="dropdown-divider"></div><a href="#" class="dropdown-item">Settings</a><a href="#" class="dropdown-item">Activity log       </a>
              <div class="dropdown-divider"></div><a href="#" class="dropdown-item">Logout</a>
            </div>
          </li>
        </ul>
      </nav>
    </header>
    </div>
	
    <!--侧边栏列表部分-->
	<div class="d-flex align-items-stretch">
      <div id="sidebar" class="sidebar py-3">
        <ul class="sidebar-menu list-unstyled" th:fragment="siderul">
            <!--教师部分-->
            <li class="sidebar-list-item" th:if="${session.user.role} == 'teacher'"
                th:each="gradeCourseVO : ${session.gradeCourseVOS}">
                <a href="#" data-toggle="collapse" data-target="#pages" aria-expanded="false" aria-controls="pages" class="sidebar-link text-muted"><i class="o-cd-1 mr-3 text-gray"></i><td th:text="${gradeCourseVO.getGradename()}"></td></a>
                <div id="pages" class="collapse">
                    <ul class="sidebar-menu list-unstyled border-left border-primary border-thick" th:each="courseVO : ${gradeCourseVO.getCourseList()}">
                        <li class="sidebar-list-item"><a href="#" class="sidebar-link text-muted pl-lg-5"><td th:text="${courseVO.getCoursename()}"></td></a>
                            <a th:href="@{/teacher/gotopublish(gradeid=${gradeCourseVO.getId()},courseid=${courseVO.getId()})}" alt="发布" class="mr-4">发布</a>
                            <a th:href="@{/teacher/gotopublishlist(gradeid=${gradeCourseVO.getId()},courseid=${courseVO.getId()})}" class="mr-4" alt="批阅">批阅</a>
                            <a th:href="@{/teacher/downWorks(gradeid=${gradeCourseVO.getId()},courseid=${courseVO.getId()})}" class="mr-4" alt="下载">下载</a> </li>
                        <!--<li class="sidebar-list-item"><a th:href="@{/analysis(gradeid=${grade.id})}" class="sidebar-link text-muted pl-lg-5">下载</a></li>-->
                    </ul>
                </div>
            </li>
            <!--学生部分-->
            <li class="sidebar-list-item" th:if="${session.user.role} == 'student'"
                th:each="courseVO : ${session.courseVOList}">
                <a th:href="@{/student/publishlist(courseid=${courseVO.getId()}, gradeid=${courseVO.getGradeid()})}" class="sidebar-link text-muted">
                    <i class="o-table-content-1 mr-3 text-gray"></i>
                    <td th:text="${courseVO.getCoursename()}"></td>
                </a>
            </li>
            <!--管理员部分-->
            <li class="sidebar-list-item" th:if="${session.user.getRole() == 'admin'}">
                <a th:href="@{/admin/teacherinfo}" class="sidebar-link text-muted">
                    <i class="o-computer-display-1 mr-3 text-gray"></i>
                    <span>教师信息</span></a></li>
            <li class="sidebar-list-item" th:if="${session.user.getRole() == 'admin'}">
                <a th:href="@{/admin/studentinfo}" class="sidebar-link text-muted">
                    <i class="o-ipad-1 mr-3 text-gray"></i>
                    <span>学生信息</span></a></li>
            <li class="sidebar-list-item" th:if="${session.user.getRole() == 'admin'}">
                <a th:href="@{/admin/gradeInfo}" class="sidebar-link text-muted">
                    <i class="o-laptop-screen-1 mr-3 text-gray"></i>
                    <span>班级信息</span></a></li>
            <li class="sidebar-list-item" th:if="${session.user.getRole() == 'admin'}">
                <a th:href="@{/admin/courseInfo}" class="sidebar-link text-muted">
                    <i class="o-imac-screen-1 mr-3 text-gray"></i>
                    <span>课程信息</span></a></li>
            <li class="sidebar-list-item" th:if="${session.user.getRole() == 'admin'}">
                <a th:href="@{/admin/importInfo}" class="sidebar-link text-muted">
                    <i class="o-imac-screen-1 mr-3 text-gray"></i>
                    <span>导入信息</span></a></li>
            <!--公共部分-->
            <li class="sidebar-list-item"><a th:href="@{/goToPersonInfo}" class="sidebar-link text-muted"><i class="o-settings-window-1 mr-3 text-gray"></i><span>个人信息</span></a></li>
            <li class="sidebar-list-item"><a href="/logout" class="sidebar-link text-muted"><i class="o-exit-1 mr-3 text-gray"></i><span>注销登录</span></a></li>
        </ul>
      </div>
	</div>

</body>
</html>